package com.example.system.information.http.network;

import com.example.system.information.global.Constant;
import com.example.system.information.utils.LogLocationUtils;


/**
 * @author :
 * @date :
 * @Description : OkGo请求结果
 */
public class OkGoBackListener {

    private String mUrl ;

    public OkGoBackListener(String url) {
        mUrl = url ;
    }

    public void onSuccess(Object body){}

    public void onWrong(String msg) {
        LogLocationUtils.writeLog(Constant.NetworkLogFileName, mUrl + ",接口信息:" + msg);
    }

    public void onError(String body) {
        LogLocationUtils.writeLog(Constant.NetworkLogFileName ,mUrl + ",网络请求失败:" + body);
    }

    public void onDataEmpty() {
        LogLocationUtils.writeLog(Constant.NetworkLogFileName ,mUrl + ",网络请求返回数据为空");
    }

    public void onChangeError(String error){
        LogLocationUtils.writeLog(Constant.NetworkLogFileName ,mUrl + ",转换异常:" + error);
    }

    public void onError(){
    }

    public String getUrl() {
        return mUrl;
    }
}
